#include<bits/stdc++.h>
using namespace std;
inline void read(int& x){
    x=0;int f=1;char ch=getchar();
    for(;!isdigit(ch);ch=getchar()){if(ch=='-')f=-1;}
    for(;isdigit(ch);ch=getchar()){x=(x<<3)+(x<<1);x+=(int)ch-'0';}x*=f;
}
const int N=1e5+5;
int hs[N];
bool special=true;
int cnt;
int n;
int r[N];
int maxn;
int rig;
void work1(){
    cout<<max(hs[1],hs[2])<<endl;
}

int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    read(n);
    for(int i=1;i<=n;i++){
        read(r[i]);
        hs[r[i]]++;
        rig=max(rig,r[i]);
        if(hs[r[i]]==1)cnt++;
        if(r[i]>2)special=false;
    }
    if(special){
        work1();
        return 0;
    }
    for(int i=1;i<=rig;i++){
        if(hs[i]){
            maxn=max(maxn,hs[i]);
        }
    }
    cout<<maxn<<endl;
    return 0;
}